package com.xiaoke.liantongdemo.widget;

import java.util.ArrayList;

import com.xiaoke.liantongdemo.bean.Category;
import com.xiaoke.liantongdemo.bean.Group;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.ScrollView;

public class GroupLayout extends ScrollView {

	public GroupLayout(Context context, Group group) {
		super(context);
		setVerticalScrollBarEnabled(false);
		LinearLayout layout = new LinearLayout(context);
		layout.setOrientation(LinearLayout.VERTICAL);
		ArrayList<Category> categorys = group.getCategorys();
		for(Category category : categorys){
			layout.addView(new CategoryLayout(context, category));
		}
		addView(layout);
	}

}
